﻿using System;
using System.Globalization;
using System.Threading.Tasks;
using Xamarin.Forms;

namespace TabbedTemplate.Converters
{
    public abstract class AsyncConverter<T> : IValueConverter
    {
        public abstract Task<T> AsyncConvert(object value, Type targetType, object parameter, CultureInfo culture);
        public object Convert(object value, Type targetType, object parameter,
            CultureInfo culture)
        {
            var res = AsyncConvert(value, targetType, parameter, culture);
            return res;
        }

        public object ConvertBack(object value, Type targetType, object parameter,
            CultureInfo culture)
        {
            throw new NotImplementedException();
        }
    }
}
